package com.da.javatest.leetCode;

/**
 * @author chenlida
 * @date 2019/1/15 09:53
 * @description
 */
public class Code303 {
}

class NumArray {
    private int[] nums;

    public NumArray(int[] nums) {
        this.nums = nums;
    }

    public int sumRange(int i, int j) {
        int total = 0;
        for (; i <= j; i++) {
            total += nums[i];
        }
        return total;
    }
}
